package org.me.bean;

import java.util.ArrayList;
import java.util.List;


import android.os.Parcel;
import android.os.Parcelable;

public class StudentData  implements Parcelable{
	
	private Student student;
	

	private List<Announcement> annList = new ArrayList<Announcement>();
	private List<CourseSchedule> courseList = new ArrayList<CourseSchedule>();
	
	public static final String Log_Tag = "StudentData";
	public static Class StudentData_CLASS = new StudentData().getClass();
	
	public StudentData(){
		courseList = new ArrayList<CourseSchedule>();		
		annList = new ArrayList<Announcement>();
		student = new Student();
	}
	
	public StudentData(Parcel in) {
		
		student = in.readParcelable(Student.class.getClassLoader());
		in.readList(annList, Announcement.class.getClassLoader());
		in.readList(courseList, CourseSchedule.class.getClassLoader());
				
	}

	public Student getStudent() {
		return student;
	}


	public void setStudent(Student student) {
		this.student = student;
	}

	public List<Announcement> getAnnList() {
		return annList;
	}

	public void setAnnList(List<Announcement> annList) {
		this.annList = annList;
	}

	public List<CourseSchedule> getCourseList() {
		return courseList;
	}

	public void setCourseList(List<CourseSchedule> courseList) {
		this.courseList = courseList;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}


	@Override
	public void writeToParcel(Parcel out, int flags) {
		out.writeParcelable(student, flags);
		out.writeList(annList);
		out.writeList(courseList);
		//out.writeList(annList);
		
	}
	public static final Parcelable.Creator<StudentData> CREATOR = new Parcelable.Creator<StudentData>() {
        public StudentData createFromParcel(Parcel in) {
            return new StudentData(in);
        }

        public StudentData[] newArray(int size) {
            return new StudentData[size];
        }
    };
	
}
